package com.example.vspm.mapper;

import com.example.vspm.entity.SenderEvaluation;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

/**
 * @author LCL
 * @date 2022/3/10
 * @desc
 */
@Repository
@Mapper
public interface SenderEvaluationMapper {

    /////////////////增加评价表
    @Insert("insert into vspm_senderEvaluation ( prePreparation,laterPreparation, soundQuality, videoQuality,interactiveManagement, operationQuality, offlineComment,onlineComment) values" +
            "(#{prePreparation},#{laterPreparation},#{soundQuality},#{videoQuality},#{interactiveManagement},#{operationQuality},#{offlineComment},#{onlineComment})")
    @Options(useGeneratedKeys=true, keyProperty="tid", keyColumn="tid")
    void addSenderEvaluation(SenderEvaluation senderEvaluation);

    //增加评价之后添加工单的taid,根据自增的评价表id
    @Update("update  vspm_senderEvaluation set taid=#{taid} where tid=#{sid}" )
    void addSenderEvaluationTaid(@Param("taid") int taid, @Param("tid") int sid);
}
